﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using iITT.iITT_Services;

namespace WebApplication4
{
    public partial class Steam_Config : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Confirm_Click(object sender, EventArgs e)
        {
           if (TextBox1.Text.Trim().Length > 1) {

             string settings = TextBox1.Text.Trim();
             iITT_Services sendInfo = new iITT_Services();
             sendInfo.AddWidget("Tchazzar", 1, "0", settings);
             Response.Write("<script> alert('Settings saved. Taking you back to widget store.');</script>");
             ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true);
             // Call method
           }

           else {
           
             Response.Write("<script> alert('You must enter your username to continue'); </script>");
           }
        }
    }
}